import { mapState } from 'vuex';

const i18nMixin = {
  computed: {
    ...mapState({
      currentLang: (state) => state.I18n.lang,
    }),
  },
  methods: {
    setLang: function (lang) {
      this.$store.dispatch('I18n/setLang', lang);
    },
  },
};

export default i18nMixin;
